<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>原型对象</title>
	</head>

	<body>
		<script>
			function Flower() {

			}
			Flower.prototype.name = "曼陀罗花";

			Flower.prototype.genera = "茄子";

			Flower.prototype.areas = "阿三地带";

			Flower.prototype.uses = "给阿三吃";
			Flower.prototype.showName = function() {
				alert(this.name);
				alert(1);
			}
			var flower1 = new Flower();
			flower1.name = "";
			flower1.showName();
			var flower2 = new Flower();
			flower2.showName();
			alert(flower1.showName() == flower2.showName());
		</script>
	</body>

</html>